package com.sgcc.ln.pmos.e_ln_home.adapter;

import android.content.Context;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseViewHolder;
import com.sgcc.pmos.nativesdk.R;
import com.sgcc.ln.pmos.common.utils.DateUtils;
import com.sgcc.ln.pmos.e_ln_home.bean.DCJZXXBean;

public class DCJZXXAdapter extends BaseQuickAdapter<DCJZXXBean.DataBean.ListBean, BaseViewHolder> {

    private Context mContext;

    public DCJZXXAdapter(Context context) {
        super(R.layout.item_dcjzxx);
        mContext = context;
    }

    @Override
    protected void convert(BaseViewHolder baseViewHolder, DCJZXXBean.DataBean.ListBean bean) {
        baseViewHolder.setText(R.id.tv_StructuralInformation1, bean.getGeneratorShortName());
        baseViewHolder.setText(R.id.tv_StructuralInformation2, bean.getLicenceCode());
        String txt3 = "";
        switch (bean.getType()) {
            case "1":
                txt3 = "省调";
                break;
            case "2":
                txt3 = "地调";
                break;
        }
        baseViewHolder.setText(R.id.tv_StructuralInformation3, txt3);
        baseViewHolder.setText(R.id.tv_StructuralInformation4, bean.getGeneratorNum());
        baseViewHolder.setText(R.id.tv_StructuralInformation5, bean.getGeneratorRatedCap() + "");
        baseViewHolder.setText(R.id.tv_StructuralInformation6, DateUtils.getStrng_to_Times_ymdhms(bean.getOpBeginDate()));
        baseViewHolder.setText(R.id.tv_StructuralInformation7, bean.getConnectVoltageOrder());

        baseViewHolder.setText(R.id.tv_StructuralInformation8, bean.getMaxTecPower() + "");
        baseViewHolder.setText(R.id.tv_StructuralInformation9, bean.getMinTecPower() + "");
        baseViewHolder.setText(R.id.tv_StructuralInformation10, bean.getLimitTecPower() + "");
        baseViewHolder.setText(R.id.tv_StructuralInformation11, bean.getTechnicalType());

    }


}


